---
title: clsTeamAssignment
summary: API reference for clsTeamAssignment.
status: draft
owner: SAIF Claims BOF team
last_reviewed: 2026-08-21
library: SAIF.Business.View.Policy
reference_type: embedded
---

# clsTeamAssignment

`clsTeamAssignment` represents one team-member assignment (loss control consultant, underwriter,
etc.) for a policy, with support for demo-user masking and two alternate external-email lookup
paths (SQL Server and Oracle). The real username is preserved internally for authorization checks
even when display values are masked ([BR-VP-012](../../business-rules.md#br-vp-012-team-assignment-masking-preserves-real-username-for-authorization)).

## Purpose
- Represents one team-member assignment and its function (e.g. Loss Control Consultant).
- Masks username, full name, phone, and extension for demo users while preserving the real username internally for authorization matching ([BR-VP-012](../../business-rules.md#br-vp-012-team-assignment-masking-preserves-real-username-for-authorization)).
- Resolves an external client's email address via two alternate lookups: `InitializeEmailAddress()` (SQL Server, [SQL-VP-025](../../sql/SQL-025-cp_external_client_lookup.md)) and `InitializeEmailAddressUsingSystemUser()` (Oracle, [SQL-VP-026](../../sql/SQL-026-sp73341_external_client_lookup.md)).

## Context
- Namespace: `SAIF.Business.View.Policy`
- Assembly/package: `SAIF.Business.View.Policy` (embedded library reference)

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| `UserName` | `ReadOnly Property UserName As String` | Masked display username when `MaskData` is set; otherwise the real username. |
| `UserIdName` | `ReadOnly Property UserIdName As String` | The real, unmasked username, preserved for downstream authorization matching regardless of `MaskData`. |
| `TeamFunction` | `Property TeamFunction As TeamFunctions` | The team function this assignment represents (e.g. `LossControlConsultant`). |
| `MaskData` | `Property MaskData As Boolean` | When set, drives masking of username, full name, phone, and extension in `Fill`. |
| `InitializeEmailAddress` | `Sub InitializeEmailAddress(idNum As String, clientLastname As String)` | Looks up an external client's email address via SQL Server ([SQL-VP-025](../../sql/SQL-025-cp_external_client_lookup.md)). |
| `InitializeEmailAddressUsingSystemUser` | `Sub InitializeEmailAddressUsingSystemUser(mailId As String, lastName As String)` | Looks up an external client's email address via Oracle ([SQL-VP-026](../../sql/SQL-026-sp73341_external_client_lookup.md)). |

## Inherited public members

Members in this section are inherited from `clsBusinessBase` in `saif.framework.core`. They are
available on this type through inheritance.

| Member | Signature | Purpose | Origin |
| --- | --- | --- | --- |
| `Rules` | `Property Rules As clsRulesManager` | Owns the rule-registration/enforcement engine for this object.† | `saif.framework.core` — `clsBusinessBase` |
| `Error` (via `IDataErrorInfo`) | `ReadOnly Property Error As String` | Surfaces broken-rule state to data-bound UI controls.† | `saif.framework.core` — `clsBusinessBase` |

## Behavioral notes
- `InitializeEmailAddress` is executed against an externally-supplied SQL Server `IDataPortalInfo`, distinct from the internally-built BDS connection used by `clsPolicySecurity`.*

## Constraints and usage notes
- Loss-control consultant authorization matching ([BR-VP-008](../../business-rules.md#br-vp-008-loss-control-consultant-assignment-match-required)) always uses `UserIdName`, never the masked `UserName`.

> **Note:** Statements marked with `†` are derived from dependency library
> documentation via the Legends CLI. Statements marked with `*` were inferred
> from code structure or contextual evidence. Statements marked with `**` could
> not be confirmed; treat as unknown until verified.

## Sources
- `SAIF.Business.View.Policy\clsTeamAssignment.vb`
